<?php

require_once('../includes/pdoconnect.php');

$insert = "INSERT INTO biocase.inavh (CatalogNumber)
    VALUES (?)";
$insertStmt = $db->prepare($insert);

$handle = fopen('melnosinavh.csv', 'r');

while (!feof($handle)) {
    $line = fgetcsv($handle);
    $insertStmt->execute($line);
    if ($insertStmt->errorCode() != '00000') {
        echo $line[0] . "\n";
        print_r($insertStmt->errorInfo());
    }
}
fclose($handle);

?>
